const Router = require('@koa/router');
const router = new Router();
router
  .get('/list', async (ctx, next) => {
    console.log(ctx.request.query);
    ctx.body = ctx.request.query;
  })
  .post('/add', async (ctx, next) => {
    console.log(ctx.request.body);
    // ctx.body = ctx.request.body;
    await ctx.render('success', {
      data: JSON.stringify({ name: '手机' })
    })
  })

module.exports = router
